public class TestString {
    public static void main(String[] args) {
        String str = "Alfa Romeo ";
        String s = str.substring(2,6);//
        String all = String.join("/","S","M","L","XL");//S/M/L/XL
        System.out.println(s);//fa R
        System.out.println(str.repeat(3));//Alfa Romeo Alfa Romeo Alfa Romeo
        System.out.println(all);
        String string = "hello";
        System.out.println(string);//hello
        string = string.substring(0,3)+"p!";
        System.out.println(string);//help!
        string = "howdy";
        String str2 = "howdy";
        System.out.println(string);
        System.out.println(s.equals(string));//false
        System.out.println("howdy".equals(string));//true
        System.out.println(string==str2);//字符串常量池？？？？？



    }
}
